package demo4;

public class Main {
    public static void main(String[] args) {
 /*       PlayMusic playMusic = new PlayMusic();
        playMusic.setName("网易云：");
        playMusic.start();
        */

/*        new Thread() {
            @Override
            public void run() {
                for (int i = 0; i < 500; i++) {
                    System.out.println(Thread.currentThread().getName() + i);
                }

            }
        }.start();*/

        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 500; i++) {
                    System.out.println(Thread.currentThread().getName() + i);
                }
            }
        },"网易云").start();

        for (int i = 0; i < 1000 ; i++) {
            Thread.currentThread().setName("Main方法" );
            System.out.println(Thread.currentThread().getName() + i);
        }








    }
}
